package sip.oshima.ua.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import sip.oshima.ua.SipClient;
import sip.oshima.ua.domain.AjaxResult;
import sip.oshima.ua.domain.SipUserInfo;

@RestController
@RequiredArgsConstructor
@RequestMapping("sip")
public class ApiController {

    @PostMapping("createUserAgent")
    public AjaxResult createUserAgent(SipUserInfo sipUserInfo){
        SipClient.getInstance().createUserAgent(sipUserInfo);
        return AjaxResult.success();
    }
}
